<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>slice方法</title>
    <!--TODO 毫无作用 没有起到应该的效果-->
</head>
<body>
    <div>
        <ul>
            <li>i</li>
            <li>love</li>
            <li>programming</li>
        </ul>
    </div>
    <script>
        let lisColl = document.querySelectorAll('li');

        let lisArray1 = [].slice.call(lisColl);
        let lisArray2 = Array.prototype.slice.call(lisColl);

        let map = function (li) {
            return li.innerHTML;
        }

        console.log(lisArray1.map(map).join(' '));
        console.log(lisArray2.map(map).join(' '));

    </script>
</body>
</html>